﻿@model P2PWeb.Models.CampUpLoad[]
@{
    ViewBag.Title = "uploadifyAgent";
}



<link href="@Url.Content("~/Content/borrow.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/uploadify.css")" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/app/UploadFile.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/app/borrowUploadify.js")"></script>


<div class="main ">
    <div class="main_top"><span class="main_top_right"></span></div>
    <div class="ouheeMain_box">
        <div class="loan_box">
            <h2 class="content_title ml_neg_75 png">上传抵押证明</h2>
            @*            <h2 class="tit_greenLine manone">
                <span></span>借款申请 </h2>*@
        </div>
        @using (Html.BeginForm("FinsishUploadifyMortgage", "borrowStep1"))
        {
            @Html.AntiForgeryToken()
            @Html.Hidden("ID", ViewData["CampaignID"] + "")

            <div class="imhint">
                抵押证明的照片的文件格式必须为jpg,png,bmp其中之一，并且文件大小必须在500k以内
            </div>
            <div class="ostep">
                <a id="step1" class="finish1"></a>
                <a id="step2" class="   select1"></a>
                <a id="step3" class="   ostep3"></a>
            </div>
            <div class='otit'>
                上传代理商证明照片(营业执照、税务登记证、组织机构代码、开户许可证)
            </div>
            <table class="attachmentsList">
                <tr class="first_td">
                    <th class="left_td">附件名称</th>
                    <th class="right_td">操作</th>
                </tr>
            </table>
             <script>

                 var fileNames = [];
                @foreach (var m in Model)
                {
                    @Html.Raw(string.Format("fileNames.push('{0}');", m.UpLoad));
                }
                 $(document).ready(function () {
                     var table = $('.attachmentsList');
                     for (var i = 0; i < 4; i++) {
                         if (i < fileNames.length) {
                             CreateUploadedRow(fileNames[i], "FileNames").appendTo(table);
                         }
                         else {
                             CreateUploadRow().appendTo(table);
                         }
                     }
                 });
            </script>                     

          <a id="AdduploadRow" class="AdduploadRowBtn" onclick="CreateUploadRow().appendTo($('.attachmentsList'));">增加</a>
            <div class="obtn02">
                @*<a id="saveBtn" class="osave">保存</a>*@
                <span id="uploading"  class="onext">确认提交</span>
            </div>
        }

    </div>
    <div class="main_bottom"><span class="main_bottom_right"></span></div>
</div>


